package com.smart.reader.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.smart.reader.common.Page;
import com.smart.reader.exception.CustomException;
import com.smart.reader.model.bo.StudentInfoAddBo;
import com.smart.reader.model.bo.StudentInfoUpdateBo;
import com.smart.reader.model.po.StudentInfo;
import com.smart.reader.model.vo.StudentInfoVo;

import java.util.List;

public interface StudentInfoService extends IService<StudentInfo> {
    /**
     * 新增学生信息
     *
     * @param studentInfo
     * @return
     * @throws CustomException
     */
    Boolean add(StudentInfoAddBo studentInfo) throws CustomException;

    /**
     * 查询学生信息并分页
     *
     * @param pageNum
     * @param pageSize
     * @return
     */
    Page<StudentInfoVo> queryInfo(int pageNum, int pageSize);

    /**
     * 根据ID删除学生信息
     *
     * @param id
     * @return
     * @throws CustomException
     */
    Boolean delete(Long id) throws CustomException;

    /**
     * 修改学生数据
     *
     * @param studentInfo
     * @return
     * @throws CustomException
     */
    Boolean edit(StudentInfoUpdateBo studentInfo) throws CustomException;

    /**
     * 根据学生ID查询学生详情
     * 
     * @param id
     * @return
     */
    StudentInfoVo detail(Long id);
    
    /**
     * 根据班级ID查询学生列表
     * 
     * @param classInfoId
     * @return
     */
    List<StudentInfoVo> queryByClassId(Long classInfoId);
}
